//
//  UserViewController.m
//  YoucApp
//
//  Created by Liam on 11/19/12.
//
//

#import "UserViewController.h"
#import "UserLoginViewController.h"
#import "UserCustomNavigationBar.h"

@interface UserViewController ()

@end

@implementation UserViewController

@synthesize delegate;

- (id)init
{
	self = [super init];
	if (self)
	{
		[self setValue:[[[UserCustomNavigationBar alloc] initWithFrame:CGRectZero] autorelease] forKeyPath:@"navigationBar"];
	}
	return self;
}

- (void)dealloc
{
	[super dealloc];
}

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view.
    
    UserLoginViewController *controller = [[[UserLoginViewController alloc] init] autorelease];
    
    [self setViewControllers:[NSArray arrayWithObject:controller]];
	
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)viewWillDisappear:(BOOL)animated
{
	[super viewWillDisappear:animated];
	
	if (delegate && [delegate respondsToSelector:@selector(userViewControllerWillDisappear:)])
	{
		[delegate userViewControllerWillDisappear:self];
	}
}

- (void)viewDidDisappear:(BOOL)animated
{
	[super viewDidDisappear:animated];
	
	if (delegate && [delegate respondsToSelector:@selector(userViewControllerDidDisappear:)])
	{
		[delegate userViewControllerDidDisappear:self];
	}
}

@end
